home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / c / gcc222-2.lha / gcc_include / sys / time.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-08  |  1.3 KB  |  55 lines

  1. /*    system time for ansic.library        */
  2. /*    (c)Copyright 1992 Davide Pasetto     */
  3.  
  4. #ifndef    _SYS_TIME_H
  5. #define _SYS_TIME_H
  6.  
  7. /* Structure returned by gettimeofday(2) system call, and used in other calls. */
  8.  
  9.  
  10. struct timeval {
  11.     long    tv_sec;     /* seconds */
  12.     long    tv_usec;    /* and microseconds */
  13. };
  14.  
  15.  
  16. struct timezone {
  17.     int    tz_minuteswest;    /* minutes west of Greenwich */
  18.     int    tz_dsttime;        /* type of dst correction */
  19. };
  20.  
  21. /* types recognized for dst correction */
  22.  
  23. #define DST_NONE    0    /* not on dst */
  24. #define DST_USA     1    /* USA style dst */
  25. #define DST_AUST    2    /* Australian style dst */
  26. #define DST_WET     3    /* Western European dst */
  27. #define DST_MET     4    /* Middle European dst */
  28. #define DST_EET     5    /* Eastern European dst */
  29.  
  30. /* timer macro (not implemented)
  31.  
  32. #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0L
  33. #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
  34.  
  35. */
  36.  
  37. /* Names of the interval timers, and structure defining a timer setting (not implemented). */
  38.  
  39. #define ITIMER_REAL     0
  40. #define ITIMER_VIRTUAL  1
  41. #define ITIMER_PROF     2
  42.  
  43. struct    itimerval {
  44.     struct timeval    it_interval;    /* timer interval */
  45.     struct timeval    it_value;        /* current value */
  46. };
  47.  
  48.  
  49. /* On the Amiga system date starts from 1st Jan 1978    */
  50. /* On every Unix box system date starts from 1st Jan 1970                */
  51.  
  52. #define    DATE_AMIGA_TO_UNIX_SEC    252460800     /* seconds */
  53.  
  54. #endif    /* _SYS_TIME_H */
  55.